<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件</title>
</head>
<body>
    <button onclick="clickevent()">点击进入</button>
    <input type="text" placeholder="你好" onfocus="focusevent()" onblur="blurevent()">


<script>
    function clickevent(){
        alert('未满18岁请立即离开!');
    }

    function focusevent(){
        console.log('聚焦');
    }

    function blurevent(){
        console.log('失焦');
    }
</script>

</body>
</html>